package operation.impl;

import book.BookList;
import operation.IOperation;

/**
 * 删除书籍
 */
public class DelOperation implements IOperation {
    @Override
    public void work(BookList bookList) {
        System.out.println("当前进行的是删除书籍操作~");
        System.out.print("请输入书籍名称：");
        String bookName= scanner.next();
        if(bookList.contains(bookName)){
            bookList.del(bookList.currentBook(bookName));
            System.out.println("删除书籍成功！");
        }else {
            System.out.println("无该书籍~");
            return;
        }

    }
}
